<%@ page language="java" contentType="text/html; charset=UTF-8" trimDirectiveWhitespaces="true"
         pageEncoding="UTF-8" %>
<%@page import="com.ketayao.utils.ConfUtil" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
<style>
    .control-label {
        text-align: right;
    }
</style>
<script>
    $(function(){
        $("#sendBtn").show();
        $("#sendBtn").click(function(){
            $.post($("[name='createFlpForm']").attr("action"),$("[name='createFlpForm']").serialize(),function(data){
                if(data.statusCode==200){
                    $('.modal').modal('hide');
                }
            },'json');
        });
    });
</script>
<c:set var="contextPath" value="${pageContext.request.contextPath}"/>

<div class="container-fluid">
    <div class="row">
        <form method="post" name="createFlpForm" action="${contextPath }/common/sendFlightPlan"
              class="form-horizontal">
            <input type="hidden" name="id" value="${cptSend.id}"/>

            <div class="form-group">
                <label class="col-md-2 control-label">航班号</label>

                <div class="col-md-9">
                    <input type="text" name="flightId" maxlength="32" class="form-control"
                           value="${cptSend.flightId }"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">机尾号</label>

                <div class="col-md-9">
                    <input type="text" name="aircraftId" maxlength="32" class="form-control"
                           value="${cptSend.aircraftId }"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">发送规则</label>

                <div class="col-md-9">
                    <input type="text" name="replySMI" maxlength="32" class="form-control"
                           value="<%=ConfUtil.getPropsValue("FLPreplySMI") %>"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-md-2 control-label">正文</label>

                <div class="col-md-9">
                    <textarea name="sendContent" style="height: 80px" class="form-control">
                        ${msgbody}
                    </textarea>
                </div>
            </div>
        </form>
    </div>

</div>